package method_injection;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author wx-li
 * @company 希睿科技(www.xraitech.com)
 * @copyright (c) 2018 希睿科技( www.xraitech.com )Inc. All rights reserved.
 * @date 2020/10/16 17:26
 * @since JDK1.8
 */
public class Test {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("trap/method_injection.xml");
        MockNewsPersister persister = (MockNewsPersister)context.getBean("mockPersister2");
        persister.persistNews();
        persister.persistNews();
    }
}
